"use strict";
// @ts-check

const path = require("node:path");
const HtmlBundlerPlugin = require("html-bundler-webpack-plugin");
const WebpackBundleTracker = require("webpack-bundle-tracker");

/** @type {import('webpack').Configuration} */
module.exports = {
  entry: {
    index: "./index.html", // path to template file
  },
  recordsPath: path.join(__dirname, "records.json"),
  plugins: [
    new HtmlBundlerPlugin({
      entry: {
        index: "./index.html", // path to template file
      },
    }),
    new WebpackBundleTracker({
      path: path.join(__dirname, "assets"),
      filename: "webpack-stats.json",
    }),
  ],
};
